// Potree格式点云数据示例
// 这是一个简化的Potree点云数据结构

var cloud = {
  "version": "1.7",
  "octreeDir": "data",
  "projection": "",
  "points": 1000,
  "boundingBox": {
    "lx": -50,
    "ly": -50,
    "lz": -50,
    "ux": 50,
    "uy": 50,
    "uz": 50
  },
  "tightBoundingBox": {
    "lx": -50,
    "ly": -50,
    "lz": -50,
    "ux": 50,
    "uy": 50,
    "uz": 50
  },
  "pointAttributes": [
    "POSITION_CARTESIAN",
    "COLOR_PACKED"
  ],
  "spacing": 1.0,
  "scale": 0.01,
  "hierarchyStepSize": 5,
  "hierarchy": [
    {
      "name": "r",
      "level": 0,
      "numPoints": 1000,
      "boundingBox": {
        "lx": -50,
        "ly": -50,
        "lz": -50,
        "ux": 50,
        "uy": 50,
        "uz": 50
      }
    }
  ]
};

// 点云数据（示例）
var points = [];
for (let i = 0; i < 1000; i++) {
  points.push({
    x: (Math.random() - 0.5) * 100,
    y: (Math.random() - 0.5) * 100,
    z: (Math.random() - 0.5) * 100,
    r: Math.floor(Math.random() * 256),
    g: Math.floor(Math.random() * 256),
    b: Math.floor(Math.random() * 256)
  });
}

// 导出点云数据
if (typeof module !== 'undefined' && module.exports) {
  module.exports = { cloud, points };
} 